//选项卡--开始
var showContent=function(){
	this.setStyle('display','block');
}
var hiddenContent=function(){
	this.setStyle('display','none');
}
var showMorph=function(){
	var hiddenClass=$$('.hidden');
	hiddenClass.setStyles({
		'display': 'none',
		'opacity': 0,
		'background-color': '#fff',
		'font-size': '16px',
		'width':'0px'
	});
	this.start({
		'display':'block',
		'opacity': 1,
		'background-color':'#d3715c',
		'font-size': '32px',
		'width':'300px',
		'height':'100px'
	});
}
//选项卡--结束

window.addEvent('domready',function(){
	var contentOne=$('contentOne');
	var contentTwo=$('contentTwo');
	var contentThree=$('contentThree');
	var contentFour=$('contentFour');

	$('one').addEvents({
		'mouseenter':showContent.bind(contentOne),
		'mouseleave':hiddenContent.bind(contentOne),
		//'click':showContent.bind(contentOne)
	});
	$('two').addEvents({
		'mouseenter':showContent.bind(contentTwo),
		'mouseleave':hiddenContent.bind(contentTwo),
		//'click':showContent.bind(contentTwo)
	});
	$('three').addEvents({
		'mouseenter':showContent.bind(contentThree),
		'mouseleave':hiddenContent.bind(contentThree),
		//'click':showContent.bind(contentThree)
	});
	$('four').addEvents({
		'mouseenter':showContent.bind(contentFour),
		'mouseleave':hiddenContent.bind(contentFour),
		//'click':showContent.bind(contentFour)
	});

	//点击形变事件
	var oneMorph=new Fx.Morph(contentOne,{
		'link':'cancel'
	});
	var twoMorph=new Fx.Morph(contentTwo,{
		'link':'cancel'
	});
	var threeMorph=new Fx.Morph(contentThree,{
		'link':'cancel'
	});
	var fourMorph=new Fx.Morph(contentFour,{
		'link':'cancel'
	});
	$('one').addEvent('click',showMorph.bind(oneMorph));
	$('two').addEvent('click',showMorph.bind(twoMorph));
	$('three').addEvent('click',showMorph.bind(threeMorph));
	$('four').addEvent('click',showMorph.bind(fourMorph));
});